<?php
return [
    'id' => 'customer-form',
    'template' => 'form_default',
    'enableClientValidation' => false,
    'enableAjaxValidation' => true,
    'options' => ['class' => 'form-validate'],
    'models' => [
        'customer' => [
            'title' => '添加会员',
            'th_with' => 80,
            'elements' => [
                /**remove qrcode by xiaofeng| 20151224'qrcode' => [
                    'type' => 'text',
                    'options' => ['class' => 'input-text']
                ],
                'check_book' => [
                    'type' => 'checkbox',
                    'items' => [0 => '否', 1 => '是'],
                    'checked' => 'checked'
                ],*/
                'name' => [
                    'type' => 'text',
                    'options' => ['class' => 'input-text']
                ],
                'sex' => [
                    'type' => 'radiolist',
                    'items' => [
                        'Male' => '男',
                        'Female' => '女',
                    ],
                ],
                'age' => [
                    'type' => 'dropdownlist',
                    'option'=>[
                        'encode'=>false,
                        'style'=>'width:170px',
                        'prompt' => '请选择出生年份'
                    ]

                ],
                'mobile' => [
                    'type' => 'text',
                    'options' => ['class' => 'input-text']
                ],
                /**'telecaptcha'=>[
                    'type'=>'widget',
                    'class'=>\doumiaoduo\telecaptcha\Telecaptcha::className(),
                    'options'=>[
                        'class'=>'input-text',
                    ],
                    'buttonOptions'=>[
                        'class'=>'button'
                    ],
                    'phoneOptions'=>[
                        'attrname'=>'tel',
                    ]

                ],*/

                'email'=>[
                    'type'=>'text',
                    'options'=>['class'=>'input-text']
                ],
                'grade_id'=>[
                    'type'=>'dropdownlist',
                    'options'=>[
                        'encode'=>false,
                        'style'=>'width:170px'
                    ],
                    'items'=>[],
                ],
                'is_old' => [
                    'type' => 'radiolist',
                    'items' => [
                        0 => '否',
                        1 => '是'
                    ],
                ],
                'password' => [
                    'type' => 'password',
                    'options' => ['class' => 'input-text','onpaste'=>"return false;"]
                ],
                'password_r' => [
                    'type' => 'password',
                    'options' => ['class' => 'input-text','onpaste'=>"return false;"]
                ],


            ],
        ]
    ]
];
